package com.aaa.mrcai.controller;


import com.aaa.mrcai.annotion.AAALog;
import com.aaa.mrcai.pojo.vo.CheckReasonVO;
import com.aaa.mrcai.query.BusinessCheckQuery;
import com.aaa.mrcai.result.AjaxResult;
import com.aaa.mrcai.service.BusinessCheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ Author: Lining
 * @ Date: 2021/12/5 18:07
 */
@RestController
@RequestMapping("businessCheck")
public class BusinessCheckController {

    @Autowired
    private BusinessCheckService businessCheckService;



    @RequestMapping("list")
    public AjaxResult list(BusinessCheckQuery businessCheckQuery){
        return businessCheckService.list(businessCheckQuery);
    }

    @RequestMapping("stateList")
    public AjaxResult stateList(){
        return businessCheckService.stateList();
    }


    @RequestMapping("stateListOneTwo")
    public AjaxResult stateListOneTwo(){
        return businessCheckService.stateListOneTwo();
    }


    @RequestMapping("areaList")
    public AjaxResult areaList(){
        return businessCheckService.areaList();
    }
    @RequestMapping("marketList")
    public AjaxResult marketList(){
        return businessCheckService.marketList();
    }

    @RequestMapping("/getOne/{id}")
    public AjaxResult getOne(@PathVariable("id") int id){
        return businessCheckService.getOne(id);
    }

    @RequestMapping("updateState")
    @AAALog("商家入驻审核")
    public AjaxResult updateState(CheckReasonVO checkReasonVO){

            return  businessCheckService.updateState(checkReasonVO);
    }


}
